package com.codefish.codefish_blog.mapper;

import com.codefish.codefish_blog.entity.CommentLikeRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author codefish
 * @since 2022-03-26
 */
@Mapper
public interface CommentLikeRecordMapper extends BaseMapper<CommentLikeRecord> {
    /**
     * 查询用户对于某篇文章下的评论的点赞情况
     *
     * @param articleId 文章id
     * @param userId    用户id
     * @return 用户点赞的评论id列表
     */
    List<Long> searchLikesOnComments(@Param("articleId") Long articleId, @Param("userId") Integer userId);
}
